﻿// -----------------------------------------------------------------------
// <copyright file="Extensions.cs" company="R&R">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

#region Imports
using System.Collections.Generic;
using System.Linq;
#endregion Imports

namespace Domino
{
    public static class Extensions
    {
        /// <summary>
        /// Determines whether a sequence contains no elements.
        /// </summary>
        /// <typeparam name="TSource">The type of the elements of source.</typeparam>
        /// <param name="source">The System.Collections.Generic.IEnumerable<T> to check for emptiness.</param>
        /// <returns>true if the source sequence contains no elements; otherwise, false.</returns>
        /// <remarks>System.ArgumentNullException: source is null.</remarks>
        public static bool None<TSource>(this IEnumerable<TSource> source)
        {
            return !source.Any();
        }
    }
}
